<template>
	<view id="life-data">
		<view class="content-life">
			<view class="h1">{{detailObj.articleTitle}}</view>
			<view class="time">{{detailObj.createTime}}</view>
			<view class="content">
				<rich-text class="richtext" :nodes="detailObj.articleContent"></rich-text>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			cid: '',
			detailObj: {},
		};
	},
	onLoad(e) {
		this.cid = e.cid;
		this.getDetail();
	},
	components: {

	},
	onShow() {

	},
	methods: {
		getDetail(){
			this.$Request.request('/api/article/get','get',{
				id: this.cid,
			}).then(res=>{
				if(res.status == 1){
					this.detailObj = res.data;
				}else {
					this.$api.msg(res.msg)
				}
			})
		},
	}
};
</script>

<style scoped lang="scss">
	.content-life {
		width: 100%;
		padding: 40rpx 32rpx;
		box-sizing: border-box;
		.h1 {
			font-size: 36rpx;
			font-weight: 600;
			color: #1D1E22;
			line-height: 56rpx;
			margin-bottom: 6rpx;
		}
		.time {
			font-size: 26rpx;
			color: #92969E;
			line-height: 40rpx;
			margin-bottom: 22rpx;
		}
		.content {
			font-size: 32rpx;
			color: #1D1E22;
			line-height: 50rpx;
		}
	}
</style>
